# sudo python topo_recommend.py   
from mininet.topo import Topo   
from mininet.net import Mininet   
from mininet.cli import CLI   
from mininet.log import setLogLevel   

class S1H2(Topo):   
  
    def build(self):   
        s1 = self.addSwitch('s1')   
        h1 = self.addHost('h1')   
        h2 = self.addHost('h2')   
        self.addLink(s1, h1)   
        self.addLink(s1, h2)   
 
    def run():   
    
        topo = S1H2()   
        
        net = Mininet(topo)   
    
    
        net.start()   
        CLI(net) 
        net.stop() 
 
if __name__ == '__main__':   
    setLogLevel('info') # output, info, debug   
    run() 